<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">    
    <title>create_file</title>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>  
  <body>
  	<s:include value="/include/header.jsp"></s:include>
  	<s:if test="%{#session.userId != null}">
   
    <s:form action="user/create_file.ra" enctype="multipart/form-data">		
		<input type="hidden" name="file_scId" id="file_scId" value="<s:property value="file_scId" />"/>
		<input type="hidden" name="file_trId" id="file_trId" value="<s:property value="file_trId" />"/>
		<input type="hidden" name="file_BId" id="file_BId" value="<s:property value="file_BId" />"/>
		<table>
			<tr><td><s:textfield label="%{getText('record.fLabel')}" name="file_label" required="true" requiredposition="left" /></td></tr>
			<tr><td><s:textfield label="%{getText('record.fDescription')}" name="file_description" required="true" requiredposition="left" /></td></tr>
			<tr><td><s:file label="%{getText('record.pdfFile')}" name="uploadFile" required="true" requiredposition="left" /></td></tr>
			<tr>
				<td>
					<s:submit value="%{getText('record.submit')}" />
					<s:reset value="%{getText('record.reset')}" />
				</td>
			</tr>
		</table>				
	</s:form>
	<s:if test="%{#request['link']=='sc'}">
	<a href="<s:url includeParams="none" namespace="/" action="user/details_service_contract" >
  					<s:param name="scId"><s:property value="%{#request['no.']}" /></s:param></s:url>">
		<s:text name="Back to Owner" />
	</a>
	</s:if>
	<s:elseif test="%{#request['link']=='tr'}">
	<a href="<s:url includeParams="none" namespace="/" action="user/details_transaction" >
  					<s:param name="trId"><s:property value="%{#request['no.']}" /></s:param></s:url>">
		<s:text name="Back to Owner" />
	</a>
	</s:elseif>
	<s:else>
	<a href="<s:url includeParams="none" namespace="/" action="user/details_bid" >
  					<s:param name="bdId"><s:property value="%{#request['no.']}" /></s:param></s:url>">
		<s:text name="Back to Owner" />
	</a>
	</s:else>

	</s:if>
  </body>
</html>
